import http from "@/utils/http";
import type { setParamsItem, modifyStageTaskSettingItem } from "./type";

/**
 * 查询配置类参数列表
 */
export const selectList = () => {
  return http.get("/crm/system/selectList");
};

/**
 * 查询tabs
 */
export const portraitList = () => {
  return http.get("/crm/system/portraitList");
};

/**
 * 获取任务模板配置
 */
export const getStageTaskSettingList = (portraitId: number | string) => {
  return http.get(`/crm/buildserver/construction/getStageTaskSettingList/${portraitId}`);
};

/**
 * 修改配置类参数
 */
export const setParams = (data: setParamsItem) => {
  return http.post("/crm/system/setParams", data);
};

/**
 * 根据taskSettingId，修改任务模板配置
 */
export const modifyStageTaskSetting = (data: modifyStageTaskSettingItem) => {
  return http.post("/crm/buildserver/construction/modifyStageTaskSetting", data);
};
